package com.vito.framework.system.welcome.service.impl;

import com.vito.framework.base.exception.CommonException;
import com.vito.framework.base.service.impl.BaseServiceImpl;
import com.vito.framework.system.menu.model.MenuBean;
import com.vito.framework.system.notice.model.NoticeBean;
import com.vito.framework.system.welcome.mapper.WelcomeMapper;
import com.vito.framework.system.welcome.service.WelcomeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class WelcomeServiceImpl extends BaseServiceImpl<WelcomeMapper, MenuBean> implements WelcomeService {

    @Resource
    WelcomeMapper welcomeMapper;

    @Override
    public List<NoticeBean> getNoctieList(Map<String, Object> paramMap) throws CommonException {
        return welcomeMapper.getNoticeList(paramMap);
    }

    @Override
    public List<MenuBean> getUserDefaultMenuList(Map<String, Object> paramMap) throws CommonException {
        return welcomeMapper.getUserDefaultMenu(paramMap);
    }

    @Override
    @SuppressWarnings("unchecked")
    public List<MenuBean> getMenuByUserId(Map<String, Object> paramMap) throws CommonException {
        return welcomeMapper.getMenuByUserId(paramMap);
    }

    @Override
    @SuppressWarnings("unchecked")
    public List<NoticeBean> getInfoClewList(Map<String, Object> paramMap)
            throws CommonException {
        return welcomeMapper.getInfoClewList(paramMap);
    }

}
